import Drag from '@/components/utils/Drag'
import Echarts from '@/components/utils/Echarts'
import Zoom from '@/components/utils/Zoom'
import GridLayout from '@/components/utils/GridLayout'
import Full from '@/components/utils/Full'
import RotateCard from '@/components/utils/RotateCard'
import zhifu from '@/components/utils/zhifu'
import game from '@/components/utils/game'
import events from '@/components/utils/Events'
// import Login from '@/components/Login'
const Login = () => import(/* webpackChunkName: "login_home_welcome" */ '@/components/Login')
// import Home from '@/components/Home'
const Home = () => import(/* webpackChunkName: "login_home_welcome" */ '@/components/Home')
// import Welcome from '@/components/Welcome'
const Welcome = () => import(/* webpackChunkName: "login_home_welcome" */ '@/components/Welcome')
// import Users from '@/components/users/Users'
const Users = () => import(/* webpackChunkName: "Users_Rights_Roles" */ '@/components/users/Users')
// import Rights from '@/components/power/Rights'
const Rights = () => import(/* webpackChunkName: "Users_Rights_Roles" */ '@/components/power/Rights')
// const Roles = () => import('@/components/power/Roles')
const Roles = () => import(/* webpackChunkName: "Users_Rights_Roles" */ '@/components/power/Roles')
// const Cate = () => import('@/components/goods/Cate')
const Cate = () => import(/* webpackChunkName: "Cate_Params_List_Add" */ '@/components/goods/Cate')
// const Params = () => import('@/components/goods/Params')
const Params = () => import(/* webpackChunkName: "Cate_Params_List_Add" */ '@/components/goods/Params')
// const List = () => import('@/components/goods/List')
const List = () => import(/* webpackChunkName: "Cate_Params_List_Add" */ '@/components/goods/List')
// const Add = () => import('@/components/goods/Add')
const Add = () => import(/* webpackChunkName: "Cate_Params_List_Add" */ '@/components/goods/Add')
// const Order = () => import('@/components/order/Order')
const Order = () => import(/* webpackChunkName: "Order_Report" */ '@/components/order/Order')
// const Report = () => import('@/components/report/Report')
const Report = () => import(/* webpackChunkName: "Order_Report" */ '@/components/report/Report')
const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: Login,
    component: Login
  },
  {
    path: '/home',
    name: Home,
    component: Home,
    redirect: '/welcome',
    children: [
      {
        path: '/welcome',
        name: Welcome,
        component: Welcome
      },
      {
        path: '/users',
        name: Users,
        component: Users
      },
      {
        path: '/rights',
        name: Rights,
        component: Rights
      },
      {
        path: '/roles',
        name: Roles,
        component: Roles
      },
      {
        path: '/categories',
        name: Cate,
        component: Cate
      },
      {
        path: '/params',
        name: Params,
        component: Params
      },
      {
        path: '/goods',
        name: List,
        component: List
      },
      {
        path: '/goods/add',
        name: Add,
        component: Add
      },
      {
        path: '/orders',
        name: Order,
        component: Order
      },
      {
        path: '/reports',
        name: Report,
        component: Report
      },
      {
        path: '/drag',
        name: Drag,
        component: Drag
      },
      {
        path: '/echarts',
        name: Echarts,
        component: Echarts
      },
      {
        path: '/zoom',
        name: Zoom,
        component: Zoom
      },
      {
        path: '/gridLayout',
        name: GridLayout,
        component: GridLayout
      },
      {
        path: '/full',
        name: Full,
        component: Full
      },
      {
        path: '/rotateCard',
        name: RotateCard,
        component: RotateCard
      },
      {
        path: '/zhifu',
        name: zhifu,
        component: zhifu
      },
      {
        path: '/game',
        name: game,
        component: game
      },
      {
        path: '/events',
        name: events,
        component: events
      }
    ]
  }
]

export default routes
